const getDeepTree = function(data, allData, isFirstFloor) {
  const result = []
  for (const item of data) {
    // 如果是第一次并且没有父节点过循环
    if (isFirstFloor && item.comment_id) {
      continue
    }
    item.children = []
    // 将父节点id===当前item的id的值筛选出来给children数组
    const children = allData.filter(obj => obj.comment_id === item.id)
    // 递归给item的children数组
    item.children = getDeepTree(children, allData, false)
    result.push(item)
  }
  return result
}
export default getDeepTree
